Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Color Structure

A color value, plus a specification of the color space it belongs to, constitute a color. A color is a structure defined by the gxColor type definition:

struct gxColor{
    gxColorSpace                space;
    gxColorProfile              profile;
    union {
            struct gxCMYKColor              cmyk;
            struct gxRGBColor               rgb;
            struct gxRGBAColor              rgba;
            struct gxHSVColor               hsv;
            struct gxHLSColor               hls;
            struct gxXYZColor               xyz;
            struct gxYXYColor               yxy;
            struct gxLUVColor               luv;
            struct gxLABColor               lab;
            struct gxYIQColor               yiq;
            gxColorValue                    gray;
            struct gxGrayAColor             graya;
            unsigned short                  pixel16;
            unsigned long                   pixel32;
            struct gxIndexedColor           indexed;
            gxColorValue                    component[4];
    } element;
};

Field descriptions

space
The color space for this color.

profile
For QuickTime vectors, this must be nil .

element
The color value for this color.

The element field is a union that can contain any one of the following fields:

cmyk
A CMYK color value.

rgb
An RGB color value.

rgba
An alpha-channel RGB color value.

hsv
An HSV color value.

hls
An HLS color value.

xyz
An XYZ color value.

yxy
A Yxy color value.

luv
An L*u*v* color value.

lab
An L*a*b* color value.

yiq
A YIQ color value.

gray
A grayscale color value

graya
An alpha-channel grayscale color value.

pixel16
A 16-bit pixel value, in gxRGB16Space format.

pixel32
A 32-bit pixel value, in any of the 32-bit color space formats.

indexed
Unused for QuickTime vectors.

component
An array of 4 undefined color-component values. Useful for indexing through the color one component at a time, as when working with different transfer modes for each color component.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |